package com.iplay.dahua.chapter2.simpleFactory;

/**
 * 打折收费类
 *
 * @author dangwu
 * @since 2021/7/20 8:33 下午
 */
public class CashRebate extends BaseCashSuper {

    private double moneyRebate = 1d;

    public CashRebate(double moneyRebate) {
        this.moneyRebate = moneyRebate;
    }

    @Override
    public double acceptCash(double money) {
        return money*moneyRebate;
    }
}
